/* eslint-disable import/newline-after-import */
const jsonServer = require('json-server');
const server = jsonServer.create();
const router = jsonServer.router('db.json');
//  http://127.0.0.1:3000/uploads/logo.png
const middlewares = jsonServer.defaults({
// 配置静态资源目录
  static: './public',
});

server.use(middlewares);
server.use(router);
server.listen(3000, () => {
  console.log('JSON Server is running');
});
